class BankAccount{
    int balance;
    static int accountNumber = 0;


    public BankAccount() {
        this.balance = 0;
        accountNumber++;
    }

    public BankAccount(int balance) {
        this.balance = balance;
        accountNumber++;
    }

    public int getBalance() {
        return balance;
    }
    public void withdraw(int amount){
        if (amount <= 0 || amount > this.getBalance()){
            System.out.println("Invalid Amount");
        }else {
            this.balance -= amount;
        }
    }
    public  void deposit(int amount){
        if (amount < 0){
            System.out.println("Invalid Amount");
        }else{
            this.balance += amount;
        }
    }
}
